from manim import ThreeDScene, ThreeDAxes, Cone, X_AXIS, Y_AXIS, Z_AXIS, PI, GrowFromCenter, Rotate, UP, ScaleInPlace, \
    RED

# python -m manim ch6-animate/cone.py ExampleCone -p
class ExampleCone(ThreeDScene):
    def construct(self):
        axes = ThreeDAxes()
        cone = Cone(direction=X_AXIS + Y_AXIS + 2 * Z_AXIS, resolution=8)
        self.set_camera_orientation(phi=7 * PI / 11, theta=PI / 9)
        self.add(axes)
        self.play(GrowFromCenter(cone))
        self.play(Rotate(cone, angle=-PI / 2, axis=UP))
        self.play(ScaleInPlace(cone, scale_factor=2))
        self.play(cone.animate.set_color(RED))

